﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tradex.Trading {
    
    /// <summary>
    /// The dynamic info about a trade.
    /// </summary>
    public sealed class TradeUpdate {

        /// <summary>
        /// Constructor taking all values.
        /// </summary>
        /// <param name="position"></param>
        /// <param name="entryAverage"></param>
        /// <param name="exitAverage"></param>
        public TradeUpdate(
            int position,
            double entryAverage,
            double exitAverage
        ) {
            Position = position;
            EntryAverage = entryAverage;
            ExitAverage = exitAverage;
        }

        /// <summary>
        /// The tota position in the trade.
        /// </summary>
        public int Position { get; private set; }

        /// <summary>
        /// The average entry price. Nan if no entry exists yet.
        /// </summary>
        public double EntryAverage { get; private set; }

        /// <summary>
        /// The average exit price. Nan if no exit exists yet.
        /// </summary>
        public double ExitAverage { get; private set; }

    }

}
